package com.tuocent.dagv2.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuocent.dagv2.common.entity.RecordReceiveData;
import com.tuocent.dagv2.entity.ArchivesRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * <p>
 * 档案文件目录 Mapper 接口
 * </p>
 *
 * @author Vincent
 * @since 2025-09-12
 */
@Mapper
public interface ArchivesRecordMapper extends BaseMapper<ArchivesRecord> {

    String userWorkReceiveSql = "SELECT a.*, b.id as receiveid FROM db_archives_record AS a ,db_work_receive AS b  ${ew.customSqlSegment}";

    @Select(userWorkReceiveSql)
    <P extends IPage<RecordReceiveData>> P getUserWorkReceive(P page, @Param("ew") Wrapper<?> queryWrapper);

}

